Skip to content

feat(datagen): add name pools and UserIdentity generation#148

Open
Dylan-M wants to merge 1 commit into04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_poolsfrom
04-06-feat_datagen_add_name_pools_and_useridentity_generation
Open

feat(datagen): add name pools and UserIdentity generation#148
Dylan-M wants to merge 1 commit into04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_poolsfrom
04-06-feat_datagen_add_name_pools_and_useridentity_generation

Conversation

@Dylan-M
Copy link
Copy Markdown
Contributor

@Dylan-M Dylan-M commented Apr 27, 2026

Proposed Change

Adds person-name pools and UserIdentity generation built on top of them.

Part of PIPE-927 common data generation package stack. Foundation for PIPE-785, PIPE-928, PIPE-943, and the rest of the simulator stack.

Checklist
  • Changes are tested
  • CI has passed

Copy link
Copy Markdown
Contributor Author

Dylan-M commented Apr 27, 2026

@Dylan-M Dylan-M marked this pull request as ready for review April 27, 2026 14:41
@Dylan-M Dylan-M requested review from a team as code owners April 27, 2026 14:41
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_pools branch from c9aa453 to 32a0573 Compare May 8, 2026 17:17
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_name_pools_and_useridentity_generation branch from e955ee9 to 6c1cf6d Compare May 8, 2026 17:17
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_pools branch from 32a0573 to e0447ff Compare May 8, 2026 17:22
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_name_pools_and_useridentity_generation branch from 6c1cf6d to 9a3b684 Compare May 8, 2026 17:23
}

// GenerateUsers produces a deterministic set of users from a seed.
func GenerateUsers(seed int64, count int, domain *DomainIdentity) []*UserIdentity {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When GenerateUsers detects a duplicate username, it only mutates u.Username. It does not update UPN, Email, or DN, so the returned UserIdentity becomes internally inconsistent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disambiguateUser now propagates the suffix through every identifier-bearing field. Username gets N appended, UPN/Email get the digit injected before @, DisplayName gets (N) appended, and the CN component of DN is rebuilt from the new DisplayName. New test exercises this with 200 users from a small name pool (forcing collisions) and asserts internal consistency plus uniqueness across Username, UPN, Email, and DN.

@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_pools branch from e0447ff to e233d6f Compare May 8, 2026 18:25
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_name_pools_and_useridentity_generation branch from 9a3b684 to 411dc81 Compare May 8, 2026 18:25
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_pools branch from e233d6f to 61eae75 Compare May 8, 2026 19:52
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_name_pools_and_useridentity_generation branch from 411dc81 to c2d0a07 Compare May 8, 2026 19:52
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_pools branch from 61eae75 to e16eaac Compare May 8, 2026 19:58
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_name_pools_and_useridentity_generation branch from c2d0a07 to d4d1bd6 Compare May 8, 2026 19:58
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_systemidentity_with_os_arch_role_types_and_version_pools branch from e16eaac to cb53fb5 Compare May 8, 2026 22:20
@Dylan-M Dylan-M force-pushed the 04-06-feat_datagen_add_name_pools_and_useridentity_generation branch from d4d1bd6 to e969cc4 Compare May 8, 2026 22:20
@Dylan-M Dylan-M requested a review from eKuG May 8, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants